<html>
<head><meta charset="utf-8"><title>What does this compile error mean? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html">What does this compile error mean?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="222526670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222526670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222526670">(Jan 13 2021 at 02:59)</a>:</h4>
<p>So I know this means that things are very broken. Does someone know how to quantify the amount of brokenness?</p>
<div class="codehilite"><pre><span></span><code>error: internal compiler error: compiler/rustc_mir/src/monomorphize/collector.rs:826:9: cannot create local mono-item for DefId(2:6820 ~ core[92cf]::fmt::{impl#2}::new_v1)
</code></pre></div>
<p>Context: changing bootstrap is always 10x as hard as I expect it to be: <a href="https://github.com/rust-lang/rust/pull/80952">https://github.com/rust-lang/rust/pull/80952</a></p>



<a name="222526757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222526757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222526757">(Jan 13 2021 at 03:00)</a>:</h4>
<p>the query stack is unhelpful:</p>
<div class="codehilite"><pre><span></span><code>query stack during panic:
#0 [collect_and_partition_mono_items] collect_and_partition_mono_items
#1 [exported_symbols] exported_symbols
end of query stack
</code></pre></div>



<a name="222527046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527046">(Jan 13 2021 at 03:04)</a>:</h4>
<p>the frustrating thing is that <code>cargo check</code> from compiler/rustc works fine, so this has something to do with the invisible environment variables being set</p>



<a name="222527410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527410">(Jan 13 2021 at 03:10)</a>:</h4>
<p>ok I replicated this without env variables</p>
<div class="codehilite"><pre><span></span><code>&gt; &quot;/home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage1/bin/rustc&quot; &quot;/home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.38/build.rs&quot; &quot;--crate-type&quot; &quot;bin&quot;
error: internal compiler error: compiler/rustc_mir/src/monomorphize/collector.rs:826:9: cannot create local mono-item for DefId(2:6820 ~ core[92cf]::fmt::{impl#2}::new_v1)
</code></pre></div>



<a name="222527420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527420">(Jan 13 2021 at 03:11)</a>:</h4>
<p>my thought is that this is actually something broken with <code>stage1-std</code></p>



<a name="222527447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527447">(Jan 13 2021 at 03:11)</a>:</h4>
<p><code>rm -r build/$TARGET/stage1-std</code> did not help</p>



<a name="222527455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527455">(Jan 13 2021 at 03:11)</a>:</h4>
<p>maybe the artifacts are getting put into stage1 instead? that might explain it</p>



<a name="222527706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527706">(Jan 13 2021 at 03:16)</a>:</h4>
<p>ok so let me think this through. This normally works with stage0, so something is different between stage 0 and stage 1. The big one I can think of is that stage 0 uses <code>stage0-sysroot</code> as the sysroot, not <code>stage0</code>. So maybe using the same sysroot for the compiler and the standard library breaks things somehow?</p>



<a name="222527756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527756">(Jan 13 2021 at 03:16)</a>:</h4>
<p>strangely</p>
<div class="codehilite"><pre><span></span><code>Checking stage1 std test/bench/example targets (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
</code></pre></div>
<p>works fine</p>



<a name="222527800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527800">(Jan 13 2021 at 03:17)</a>:</h4>
<p>and this bug happens <code>if !tcx.is_mir_available</code>: <a href="https://github.com/rust-lang/rust/blob/058a71016553f267ae80b90276ef79956457d51a/compiler/rustc_mir/src/monomorphize/collector.rs#L825">https://github.com/rust-lang/rust/blob/058a71016553f267ae80b90276ef79956457d51a/compiler/rustc_mir/src/monomorphize/collector.rs#L825</a></p>



<a name="222527815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527815">(Jan 13 2021 at 03:17)</a>:</h4>
<p>so maybe <code>x.py check</code> needs to be emitting more artifacts than it does currently?</p>



<a name="222527860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527860">(Jan 13 2021 at 03:18)</a>:</h4>
<p>I don't know why it would work for stage 0 though</p>



<a name="222527885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527885">(Jan 13 2021 at 03:18)</a>:</h4>
<p>oh interesting, stage0-sysroot has <a href="http://libstd.so">libstd.so</a> but stage1 does not</p>



<a name="222527902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222527902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222527902">(Jan 13 2021 at 03:19)</a>:</h4>
<p>actually stage0-sysroot has .rlib files too, stage1 <em>only</em> has .rmeta files</p>



<a name="222528534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528534">(Jan 13 2021 at 03:30)</a>:</h4>
<p>oh here's a hint - this is crashing while trying to compile specifically a build script</p>



<a name="222528539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528539">(Jan 13 2021 at 03:31)</a>:</h4>
<p>maybe the sysroot for the host and target is getting mixed up?</p>



<a name="222528784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528784">(Jan 13 2021 at 03:35)</a>:</h4>
<p>So you think maybe it's looking at an RLIB that is missing some MIR?</p>



<a name="222528798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528798">(Jan 13 2021 at 03:35)</a>:</h4>
<p>no, I think it's compiling build scripts with stage1</p>



<a name="222528842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528842">(Jan 13 2021 at 03:36)</a>:</h4>
<p>which doesn't work because it's only generated check metadata for stage1, it needs to use stage0 to have MIR available</p>



<a name="222528877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528877">(Jan 13 2021 at 03:37)</a>:</h4>
<p>ok so I think the issue is actually in the rustc shim, not in bootstrap directly</p>



<a name="222528956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528956">(Jan 13 2021 at 03:38)</a>:</h4>
<p>yup that's the issue:</p>
<div class="codehilite"><pre><span></span><code>using snapshot rustc (/home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage1/bin/rustc)
</code></pre></div>



<a name="222528960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528960">(Jan 13 2021 at 03:38)</a>:</h4>
<p>stage1 should <em>never</em> be marked as a snapshot</p>



<a name="222528999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222528999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222528999">(Jan 13 2021 at 03:39)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/bootstrap/builder.rs#L1173-L1194">https://github.com/rust-lang/rust/blob/master/src/bootstrap/builder.rs#L1173-L1194</a></p>



<a name="222529090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529090">(Jan 13 2021 at 03:41)</a>:</h4>
<p>ayyyy that did it <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="222529165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529165">(Jan 13 2021 at 03:42)</a>:</h4>
<p>oh booo, so close</p>
<div class="codehilite"><pre><span></span><code>error[E0514]: found crate `chalk_derive` compiled by an incompatible version of rustc
  --&gt; /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/chalk-ir-0.36.0/src/lib.rs:13:5
   |
13 | use chalk_derive::{Fold, HasInterner, SuperVisit, Visit, Zip};
   |     ^^^^^^^^^^^^
   |
   = help: please recompile that crate using this compiler (rustc 1.51.0-dev)
   = note: the following crate versions were found:
           crate `chalk_derive` compiled by rustc 1.49.0-beta.1 (21dea46d8 2020-11-18): /home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps/libchalk_derive-843b3d0b9b865ca6.so
</code></pre></div>



<a name="222529208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529208">(Jan 13 2021 at 03:43)</a>:</h4>
<p>Do you need to <code>./x.py clean</code> and then it will work, or is the solution untenable?</p>



<a name="222529227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529227">(Jan 13 2021 at 03:43)</a>:</h4>
<p>I can try but I doubt it will help, x.py will just regenerate the same artifacts</p>



<a name="222529240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529240">(Jan 13 2021 at 03:43)</a>:</h4>
<p>Well this stuff is over my head <span aria-label="innocent" class="emoji emoji-1f607" role="img" title="innocent">:innocent:</span></p>



<a name="222529245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529245">(Jan 13 2021 at 03:43)</a>:</h4>
<p>somehow the beta and stage1 sysroots got mixed up</p>



<a name="222529553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529553">(Jan 13 2021 at 03:48)</a>:</h4>
<p>oh I found the issue - I'm the one who mixed them up just now.  The build scripts and proc macros are being compiled by beta, so they can't be loaded by stage1.</p>



<a name="222529565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529565">(Jan 13 2021 at 03:48)</a>:</h4>
<p>I think the fix is to use the stage0 <em>standard library</em>/sysroot, but still use the stage1 compiler</p>



<a name="222529572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529572">(Jan 13 2021 at 03:48)</a>:</h4>
<p>hopefully that doesn't break things</p>



<a name="222529599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529599">(Jan 13 2021 at 03:49)</a>:</h4>
<p>alternatively I can just unconditionally build the stage1 standard library I guess? I don't know if that's actually helpful since now you need a cross-compiler again</p>



<a name="222529837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529837">(Jan 13 2021 at 03:53)</a>:</h4>
<p>amazing</p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs</span>
<span class="gh">index 1aefcad6da0..83ff66d29ca 100644</span>
<span class="gd">--- a/src/bootstrap/builder.rs</span>
<span class="gi">+++ b/src/bootstrap/builder.rs</span>
<span class="gu">@@ -998,7 +998,9 @@ pub fn cargo(</span>
         // the stage0 build means it uses libraries build by the stage0
         // compiler, but for tools we just use the precompiled libraries that
         // we've downloaded
<span class="gd">-        let use_snapshot = mode == Mode::ToolBootstrap;</span>
<span class="gi">+        //</span>
<span class="gi">+        // TODO: this is probably wrong</span>
<span class="gi">+        let use_snapshot = mode == Mode::ToolBootstrap || self.kind == Kind::Check;</span>
         assert!(!use_snapshot || stage == 0 || self.local_rebuild);

         let maybe_sysroot = self.sysroot(compiler);
</code></pre></div>



<a name="222529860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529860">(Jan 13 2021 at 03:53)</a>:</h4>
<p>lol even bootstrap thinks I'm doing this wrong</p>
<div class="codehilite"><pre><span></span><code>thread &#39;main&#39; panicked at &#39;assertion failed: !use_snapshot || stage == 0 || self.local_rebuild&#39;, src/bootstrap/builder.rs:1004:9
</code></pre></div>



<a name="222529918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222529918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222529918">(Jan 13 2021 at 03:54)</a>:</h4>
<p>that did not help</p>



<a name="222530111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222530111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222530111">(Jan 13 2021 at 03:57)</a>:</h4>
<p>yeah I really don't know why I expected this to work</p>
<div class="codehilite"><pre><span></span><code>error[E0514]: found crate `std` compiled by an incompatible version of rustc
  |
  = help: please recompile that crate using this compiler (rustc 1.51.0-dev)
  = note: the following crate versions were found:
          crate `std` compiled by rustc 1.49.0-beta.1 (21dea46d8 2020-11-18): /home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-432ef729fbfba89e.rlib
          crate `std` compiled by rustc 1.49.0-beta.1 (21dea46d8 2020-11-18): /home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-432ef729fbfba89e.so
</code></pre></div>



<a name="222530219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222530219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222530219">(Jan 13 2021 at 03:59)</a>:</h4>
<p>ok, I think I know what's going wrong: I want a fully built standard library for the <em>host</em>, built by stage 1. I don't have that available. I have a standard library for the host built by stage 0, and I have a library for the target built by stage1, but no host. So even if I unconditionally built the standard library, it wouldn't help - it would be for the wrong platform.</p>



<a name="222530282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222530282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222530282">(Jan 13 2021 at 04:00)</a>:</h4>
<p>(well, it would happen to work until someone tried to cross-compile)</p>



<a name="222530334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222530334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222530334">(Jan 13 2021 at 04:01)</a>:</h4>
<p>the reason this work for stage0 is it happens to have 2 standard libraries available: the version from master, with only metadata available, and the beta version distributed with the beta compiler. So it has it prebuilt and doesn't have to worry about this, that's what 'snapshot' means in this context.</p>



<a name="222530357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222530357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222530357">(Jan 13 2021 at 04:02)</a>:</h4>
<p>clearly the solution is to get rid of all proc-macros used by the compiler <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="222531712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222531712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222531712">(Jan 13 2021 at 04:23)</a>:</h4>
<p>wow have I really spent an hour on this?</p>



<a name="222531850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222531850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222531850">(Jan 13 2021 at 04:24)</a>:</h4>
<p>ok, the issue after building a host std unconditionally is that there is both check metadata and build metadata (I think? I don't know how crate loading works, seems weird that they conflict if they have the same hash)</p>
<div class="codehilite"><pre><span></span><code>error[E0464]: multiple matching crates for `std`
  |
  = note: candidates:
          crate `std`: /home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-57e9e473fc04d4ba.so
          /home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-57e9e473fc04d4ba.rlib
</code></pre></div>



<a name="222531864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222531864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222531864">(Jan 13 2021 at 04:24)</a>:</h4>
<p>the build scripts did compile successfully first, though</p>



<a name="222532513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222532513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222532513">(Jan 13 2021 at 04:34)</a>:</h4>
<p>wrote this up and now I am going to bed <a href="https://github.com/rust-lang/rust/pull/80952#issuecomment-759198841">https://github.com/rust-lang/rust/pull/80952#issuecomment-759198841</a></p>



<a name="222532609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222532609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222532609">(Jan 13 2021 at 04:36)</a>:</h4>
<p>fyi <span class="user-mention silent" data-user-id="116122">simulacrum</span> I tagged you on the PR but I don't consider this very high priority, I would rather try to figure out <a href="https://github.com/rust-lang/rust/pull/79540">https://github.com/rust-lang/rust/pull/79540</a> first.</p>



<a name="222533338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222533338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222533338">(Jan 13 2021 at 04:49)</a>:</h4>
<p>From your PR:</p>
<blockquote>
<p>It is also very easy to support.</p>
</blockquote>
<p>I guess you jinxed yourself? <span aria-label="stuck out tongue wink" class="emoji emoji-1f61c" role="img" title="stuck out tongue wink">:stuck_out_tongue_wink:</span></p>



<a name="222628404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222628404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222628404">(Jan 13 2021 at 18:58)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/What.20does.20this.20compile.20error.20mean.3F/near/222530357">said</a>:</p>
<blockquote>
<p>clearly the solution is to get rid of all proc-macros used by the compiler <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>
</blockquote>
<p>this remains the easiest way to fix this <span aria-label="joy" class="emoji emoji-1f602" role="img" title="joy">:joy:</span></p>



<a name="222634330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20this%20compile%20error%20mean%3F/near/222634330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20this.20compile.20error.20mean.3F.html#222634330">(Jan 13 2021 at 19:40)</a>:</h4>
<p>Removing all build scripts from sysroot builds would also be nice</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>